
package protocol.transactions;

import protocol.XoneProtocol;
import protocol.XoneServiceCode;

import com.netease.http.THttpRequest;

public class ModifyCellPhonePwTransaction extends EncryptBaseTransaction {

    String mPhoneNumber;
    String mCaptcha;
    String mPw;

    public ModifyCellPhonePwTransaction(String phoneNumber, String captcha, String pw) {
        super(TRANSACTION_TYPE_MODIFY_CELLPHONE_PW);
        mPhoneNumber = phoneNumber;
        mCaptcha = captcha;
        mPw = pw;
    }

    @Override
    protected void onXoneTransactionSuccess(int code, Object obj) {
        notifyMessage(XoneServiceCode.TRANSACTION_SUCCESS,null);
    }

    @Override
    void realOntransact() {
        THttpRequest request = XoneProtocol.getInstance().createModifyCellPhonPwRequest(
                mPhoneNumber, mCaptcha, mPw);
        sendRequest(request);
    }

}
